package com.ruoyi.user.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import lombok.EqualsAndHashCode;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
/**
 * 用户语音通话对象 t_user_voice_call
 * 
 * @author DEREK
 * @date 2023-08-15
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("t_user_voice_call")
public class UserVoiceCall
{

    /** 主键ID */
	@TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 对方用户ID */
    @Excel(name = "对方用户ID")
    private Long toUserId;

    /** 会话ID */
    @Excel(name = "会话ID")
    private String sid;
    
    @Excel(name = "房间ID")
    private String roomId;

    /** 发起扩展字段 */
    @Excel(name = "发起扩展字段")
    private String extend;

    /** 回调扩展字段 */
    @Excel(name = "回调扩展字段")
    private String extend2;

    /** 状态 0=发起中 1=通话中 2=已结束 3=已拒绝 4=未接通 5=已取消 6=余额不足自动挂断 */
    @Excel(name = "状态 0=发起中 1=通话中 2=已结束 3=已拒绝 4=未接通 5=已取消 6=余额不足自动挂断")
    private Integer status;

    /** 通话开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "通话开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date begTime;

    /** 通话结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "通话结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 是否结算 0=否 1=是 */
    @Excel(name = "是否结算 0=否 1=是")
    private Integer isSettle;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    private String remark;
    private BigDecimal amount;
    private Long minute; // 分钟数
    
    @TableField(exist = false)
    private String nickName;
    @TableField(exist = false)
    private String toNickName;
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("toUserId", getToUserId())
            .append("sid", getSid())
            .append("extend", getExtend())
            .append("extend2", getExtend2())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("begTime", getBegTime())
            .append("endTime", getEndTime())
            .append("isSettle", getIsSettle())
            .append("remark", getRemark())
            .toString();
    }
}
